import { request } from '../utils/request';
import type { LoginParams, LoginResult, User } from './types';

export const userApi = {
  login: (data: LoginParams) => request.post<LoginResult>('/server/login', data),
  getUserInfo: () => request.get<User>('/user/info'),
  logout: () => request.post<void>('/user/logout'),
};